<?php
class Funcionarios_model extends CI_Model
{
	public function __construct()
	{
		parent::__construct();
	}
	
	public function getFuncionarios()
	{
        $this->db->flush_cache();
		$this->db->start_cache();		
		
		$this->db->from("tb_funcionarios");
		$this->db->where("flag_ativo =", "S");
		$this->db->where("flag_deletado =", "N");
		$this->db->where("nivel =", "S");
		$this->db->or_where("nivel =", "C");
		
		$this->db->order_by("nome", "ASC");
		
		$query = $this->db->get("tb_funcionarios");
		$data = $query->result();
		$this->db->flush_cache();
		return $data;
	}
}